﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/jui.Master" Inherits="System.Web.Mvc.ViewPage<Dictionary<string, object>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    门店
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="layout" class="noNavTab ">
        <div id="navTab">
            <h2 class="contentTitle">
                门店</h2>
            <div class="pageContent">
                <div class="pageFormContent nowrap" layouth="56">
                    <%
                        int id = Utils.StrToInt(ViewData["id"], 0);
                        string tname = "Sys_outlets";
                        string url = "/sysManage/list_3";
                        Dictionary<string, object> d = CommonBLL.GetModel(tname, "*", id);
                        if (d != null)
                        {
                            using (Html.BeginEditForm(Database.Default, tname, id, url))
                            { %>
                    
                    <dl>
                    <dt>门店全称：</dt>
                    <dd>
                        <%:Html.TextBox("t0_fullName", d["fullName"].ToString(), new { @class = "required textInput", size = 50, maxlength = "100" })%>
                    </dd>
                </dl>
                <dl>
                    <dt>门店简称：</dt>
                    <dd>
                        <%:Html.TextBox("t0_Name", d["Name"].ToString(), new { @class = "required textInput", size = 50, maxlength = "100" })%>
                    </dd>
                </dl>
                <dl>
                    <dt>经营地址：</dt>
                    <dd>
                        <%:Html.TextBox("t0_address", d["address"].ToString(), new { @class = "required textInput", size = 50, maxlength = "100" })%>
                    </dd>
                </dl>
                <dl>
                    <dt>所属公司：</dt>
                    <dd>
                        <select class="combox " name="t0_pid">
                                <%
                                ViewDataDictionary vdd = new ViewDataDictionary();
                                vdd.Add("selectId", d["pid"].ToString());
                                    Html.RenderPartial("~/Views/Shared/selectControl.ascx", sysManageBLL.get_fCompany(),vdd); %>
                        </select>
                    </dd>
                </dl>
                <dl>
                    <dt>所在地：</dt>
                    <dd>
                        <%:Html.TextBox("t0_area", d["area"].ToString(), new { @class = "required textInput", maxlength = "25" })%>
                    </dd>
                </dl>
                <dl>
                    <dt>门店状态：</dt>
                    <dd>
                        <label>
                        <%:Html.RadioButton("t0_state", "0", !Convert.ToBoolean(d["state"]))%>暂停
                        </label>
                        <label><%:Html.RadioButton("t0_state", "1", Convert.ToBoolean(d["state"]))%>正常</label>
                    </dd>
                </dl>
                <dl>
                    <dt>门店类型：</dt>
                    <dd>
                        <label>
                        <%:Html.RadioButton("t0_type", "0", !Convert.ToBoolean(d["type"]))%>暂停
                        </label>
                        <label><%:Html.RadioButton("t0_type", "1", Convert.ToBoolean(d["type"]))%>正常</label>
                    </dd>
                </dl>
                <dl>
                    <dt>门店编码：</dt>
                    <dd>
                        <%:Html.TextBox("t0_Code", d["Code"].ToString(), new { @class = "required textInput", maxlength = "25" })%>
                    </dd>
                </dl>
                <dl>
                    <dt>门店经理：</dt>
                    <dd>
                        <%:Html.TextBox("t0_principal", d["principal"].ToString(), new { @class = "required textInput", maxlength = "25" })%>
                    </dd>
                </dl>
                <dl>
                    <dt>负责人手机：</dt>
                    <dd>
                        <%:Html.TextBox("t0_MobileNo", d["MobileNo"].ToString(), new { @class = "required textInput", maxlength = "50" })%>
                    </dd>
                </dl>
                <dl>
                    <dt>邮政编码：</dt>
                    <dd>
                        <%:Html.TextBox("t0_postcode", d["postcode"].ToString(), new { @class = "required textInput", maxlength = "25" })%>
                    </dd>
                </dl>
                <dl>
                    <dt>门店电话：</dt>
                    <dd>区号-号码-分机号</dd>
                    <dd>
                        <%:Html.TextBox("t0_TelArea", d["TelArea"].ToString(), new { @class = "digits  textInput", maxlength = "25" })%>
                        <%:Html.TextBox("t0_Tel", d["Tel"].ToString(), new { @class = " textInput", maxlength = "50" })%>
                        <%:Html.TextBox("t0_TelExt", d["TelExt"].ToString(), new { @class = "digits  textInput", maxlength = "25" })%>
                    </dd>
                </dl>
                
                <dl>
                    <dt>门店传真：</dt>
                    <dd>区号-号码-分机号</dd>
                    <dd>
                        <%:Html.TextBox("t0_FaxArea", d["FaxArea"].ToString(), new { @class = "digits  textInput", maxlength = "25" })%>
                        <%:Html.TextBox("t0_Fax", d["Fax"].ToString(), new { @class = " textInput", maxlength = "50" })%>
                        <%:Html.TextBox("t0_FaxExt", d["FaxExt"].ToString(), new { @class = "digits  textInput", maxlength = "25" })%>
                    </dd>
                </dl>
                
                <dl>
                    <dt>门店介绍：</dt>
                    <dd>
                        <%:Html.TextArea("t0_intro", d["intro"].ToString(), new { rows = "5", cols = "40", maxlength = "250" })%>
                    </dd>
                </dl>
                <dl>
                    <dt>门店照片：</dt>
                    <dd>
                        <a class="button" href="#" id="btnUpload"><span>上传图片</span></a>
                        <div id="hdImg1" class="showImgUrl">
                        <%
                    string imgUrl = d["logo"].ToString().Replace("-p", "");
                                if (!string.IsNullOrEmpty(imgUrl))
                            { %>
                                <span><img src='/<%:imgUrl %>'><a href="?" class="delImg" to="t0_logo">删除</a></span>
                            <%}
                                    %>
                            </div>
                            <%:Html.Hidden("t0_logo", imgUrl, new { @class = " textInput" })%>
                    </dd>
                </dl>
                <dl>
                    <dt>门店网址：</dt>
                    <dd>
                        <%:Html.TextBox("t0_Url", d["Url"].ToString(), new { @class = " textInput", size = 50, maxlength = "50" })%>
                    </dd>
                </dl>
                <dl>
                    <dt>门店地标：</dt>
                    <dd>
                        
                    </dd>
                </dl>
                    <dl>
                        <dt>&nbsp</dt>
                        <dd>
                            <div class="buttonActive">
                                <div class="buttonContent">
                                    <button type="submit">
                                        修改</button></div>
                            </div>
                        </dd>
                        <dd>
                            <a class="button" href='<%:url %>'><span>返回</span></a></dd>
                    </dl>
                    <%}
                        }%>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="../../content/jui-normal.css" rel="stylesheet" type="text/css" />
    <link href="/content/colorbox.css" rel="stylesheet" type="text/css" />
    <script src="/scripts/jquery.colorbox.js" type="text/javascript"></script>
    <script type="text/javascript" src="/scripts/jquery.autocomplete.min.js"></script>
    <script src="../../../Scripts/common.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            createUpload('btnUpload', 't0_logo', 'Dest_Img_Max_1', function () { showUploadImg($('#t0_logo'), $('#hdImg1'), '') });
        });
    </script>
</asp:Content>
